package com.bsz.patrol;

import com.bsz.patrol.controller.ReportApplication;
import javafx.application.Application;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class PatrolApplication {
    public static void main(String[] args) {
        // 启动 Spring 上下文
        ConfigurableApplicationContext context = SpringApplication.run(PatrolApplication.class, args);

        // 设置 JavaFX 应用程序的上下文
        ReportApplication.setApplicationContext(context);

        // 启动 JavaFX 应用
        Application.launch(ReportApplication.class, args);
    }
}

